Skip to content

Enable octane in CICD - #9059

Merged
nolanpro merged 8 commits into
developfrom
test-octane-cicd
Sep 22, 2026
Merged

nolanpro merged 8 commits into
developfrom
test-octane-cicd

Conversation

@nolanpro

@nolanpro nolanpro commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

ci:deploy

@cursor

cursor Bot commented Sep 14, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes tenant-scoped authentication (Passport/OAuth singleton flushing and guard binding) and real-time channel authorization—both security-sensitive and easy to regress under Octane.

Overview
Fixes API 401s and Echo/Pusher auth failures when multitenancy runs under Laravel Octane, where worker-scoped singletons kept the landlord APP_KEY and stale Passport guards after SwitchTenant.

Passport / API cookies: Adds PassportTokenGuardFactory and registers a custom passport guard so TokenGuard resolves the encrypter and request from the current app (per-request sandbox), not the Octane worker root. SwitchTenant now calls flushTenantSensitiveSingletons when switching tenants or reverting to landlord—dropping encrypter, OAuth servers, ClientRepository, cookie factory, and cached auth guards.

Broadcasting: Stops replacing BroadcastManager on every tenant switch (which broke channel callbacks under Octane). BroadcastServiceProvider installs one TenantAwareBroadcastManager at boot when multitenancy is on. TenantAwarePusherBroadcaster reads currentTenant at auth/broadcast time: it prefixes outgoing channel names and strips the tenant prefix before matching routes/channels.php callbacks, with stricter rejection of wrong-tenant or unprefixed private channels.

Octane config: Skips warming AnonymousUser at worker boot when multitenancy is enabled (avoids DB on default connection before tenant resolution) and flushes it per request instead.

Also expands README CI/CD documentation, disables PHPUnit real-time output by default via PHPUNIT_REALTIME_OUTPUT, and adds unit tests for the guard factory, Pusher broadcaster, and tenant switch flushing.

Reviewed by Cursor Bugbot for commit f18d35d. Bugbot is set up for automated code reviews on this repo. Configure here.

@nolanpro

Copy link
Copy Markdown
Contributor Author

QA server K8S was successfully deployed https://ci-dbbc02bb39.engk8s.processmaker.net

1 similar comment
@nolanpro

Copy link
Copy Markdown
Contributor Author

QA server K8S was successfully deployed https://ci-dbbc02bb39.engk8s.processmaker.net

@nolanpro nolanpro closed this Sep 15, 2026
@nolanpro nolanpro reopened this Sep 15, 2026
@nolanpro

Copy link
Copy Markdown
Contributor Author

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

1 similar comment
@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

@nolanpro nolanpro closed this Sep 22, 2026
@nolanpro nolanpro reopened this Sep 22, 2026
@decisions-sonarqube

Copy link
Copy Markdown

@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

@nolanpro
nolanpro merged commit 30b2eab into develop Sep 22, 2026
8 of 9 checks passed
@nolanpro nolanpro changed the title Test octane CICD - do not merge Enable octane in CICD Sep 22, 2026
@vladyrichter

Copy link
Copy Markdown

QA server K8S was successfully deployed https://tenant-1.ci-dbbc02bb39.engk8s.processmaker.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants